+2005-03-01 Matthias Clasen <mclasen@redhat.com>
+
+ * gdk/gdkkeyuni.c
+ * gdk/gdkpixbuf-drawable.c
+ * gdk/gdkrgb.c
+ * gdk/x11/gdkdnd-x11.c
+ * gdk/x11/gdkevents-x11.c
+ * gdk/x11/gdkproperty-x11.c
+ * gdk/x11/gdkvisual-x11.c
+ * gdk-pixbuf/gdk-pixbuf.c
+ * gtk/gtkaction.c
+ * gtk/gtkbindings.c
+ * gtk/gtkcolorbutton.c
+ * gtk/gtkcombo.c
+ * gtk/gtkcontainer.c
+ * gtk/gtkfilechooserdefault.c
+ * gtk/gtkfilesel.c
+ * gtk/gtkgamma.c
+ * gtk/gtkiconview.c
+ * gtk/gtkinputdialog.c
+ * gtk/gtkitemfactory.c
+ * gtk/gtkmenu.c
+ * gtk/gtktextview.c
+ * gtk/gtktooltips.c
+ * gtk/gtktreedatalist.c
+ * gtk/gtkuimanager.c
+ * gtk/tree_minus.xpm
+ * gtk/tree_plus.xpm
+ * gtk/xdgmime/xdgmime.c
+ * gtk/xdgmime/xdgmime.h:
+ Move constant data to .rodata.
+
2005-02-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (connect_proxy): Improve the handling
+2005-03-01 Matthias Clasen <mclasen@redhat.com>
+
+ * gdk/gdkkeyuni.c
+ * gdk/gdkpixbuf-drawable.c
+ * gdk/gdkrgb.c
+ * gdk/x11/gdkdnd-x11.c
+ * gdk/x11/gdkevents-x11.c
+ * gdk/x11/gdkproperty-x11.c
+ * gdk/x11/gdkvisual-x11.c
+ * gdk-pixbuf/gdk-pixbuf.c
+ * gtk/gtkaction.c
+ * gtk/gtkbindings.c
+ * gtk/gtkcolorbutton.c
+ * gtk/gtkcombo.c
+ * gtk/gtkcontainer.c
+ * gtk/gtkfilechooserdefault.c
+ * gtk/gtkfilesel.c
+ * gtk/gtkgamma.c
+ * gtk/gtkiconview.c
+ * gtk/gtkinputdialog.c
+ * gtk/gtkitemfactory.c
+ * gtk/gtkmenu.c
+ * gtk/gtktextview.c
+ * gtk/gtktooltips.c
+ * gtk/gtktreedatalist.c
+ * gtk/gtkuimanager.c
+ * gtk/tree_minus.xpm
+ * gtk/tree_plus.xpm
+ * gtk/xdgmime/xdgmime.c
+ * gtk/xdgmime/xdgmime.h:
+ Move constant data to .rodata.
+
2005-02-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (connect_proxy): Improve the handling
+2005-03-01 Matthias Clasen <mclasen@redhat.com>
+
+ * gdk/gdkkeyuni.c
+ * gdk/gdkpixbuf-drawable.c
+ * gdk/gdkrgb.c
+ * gdk/x11/gdkdnd-x11.c
+ * gdk/x11/gdkevents-x11.c
+ * gdk/x11/gdkproperty-x11.c
+ * gdk/x11/gdkvisual-x11.c
+ * gdk-pixbuf/gdk-pixbuf.c
+ * gtk/gtkaction.c
+ * gtk/gtkbindings.c
+ * gtk/gtkcolorbutton.c
+ * gtk/gtkcombo.c
+ * gtk/gtkcontainer.c
+ * gtk/gtkfilechooserdefault.c
+ * gtk/gtkfilesel.c
+ * gtk/gtkgamma.c
+ * gtk/gtkiconview.c
+ * gtk/gtkinputdialog.c
+ * gtk/gtkitemfactory.c
+ * gtk/gtkmenu.c
+ * gtk/gtktextview.c
+ * gtk/gtktooltips.c
+ * gtk/gtktreedatalist.c
+ * gtk/gtkuimanager.c
+ * gtk/tree_minus.xpm
+ * gtk/tree_plus.xpm
+ * gtk/xdgmime/xdgmime.c
+ * gtk/xdgmime/xdgmime.h:
+ Move constant data to .rodata.
+
2005-02-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (connect_proxy): Improve the handling
GDK_PIXBUF_VAR const guint gdk_pixbuf_minor_version = GDK_PIXBUF_MINOR;
GDK_PIXBUF_VAR const guint gdk_pixbuf_micro_version = GDK_PIXBUF_MICRO;
-GDK_PIXBUF_VAR const char *gdk_pixbuf_version = GDK_PIXBUF_VERSION;
+GDK_PIXBUF_VAR const char gdk_pixbuf_version[] = GDK_PIXBUF_VERSION;
/* Error quark */
GQuark
* is smallish. It would save about ~1000 bytes total.
*/
-static struct {
+static const struct {
unsigned short keysym;
unsigned short ucs;
} gdk_keysym_to_unicode_tab[] = {
return 0;
}
-static struct {
+static const struct {
unsigned short keysym;
unsigned short ucs;
} gdk_unicode_to_keysym_tab[] = {
\f
-static guint32 mask_table[] = {
+static const guint32 mask_table[] = {
0x00000000, 0x00000001, 0x00000003, 0x00000007,
0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,
int y2,
GdkColormap *cmap);
-static cfunc convert_map[] = {
+static const cfunc convert_map[] = {
rgb1,rgb1,rgb1a,rgb1a,
rgb8,rgb8,rgb8a,rgb8a,
rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb,
gint x_align, gint y_align,
GdkRgbCmap *cmap);
-static const gchar* visual_names[] =
+static const gchar *const visual_names[] =
{
"static gray",
"grayscale",
static GdkRgbCmapInfo *gdk_rgb_cmap_get_info (GdkRgbCmap *cmap, GdkRgbInfo *image_info);
-static const char *gdk_rgb_key = "gdk-rgb-info";
+static const char gdk_rgb_key[] = "gdk-rgb-info";
static GQuark gdk_rgb_quark = 0;
static gboolean gdk_rgb_install_cmap = FALSE;
const static struct {
const char *atom_name;
GdkFilterFunc func;
-} xdnd_filters[] = {
+} const xdnd_filters[] = {
{ "XdndEnter", xdnd_enter_filter },
{ "XdndLeave", xdnd_leave_filter },
{ "XdndPosition", xdnd_position_filter },
/* Utility functions */
static struct {
- gchar *name;
+ const gchar *name;
GdkAtom atom;
GdkDragAction action;
} xdnd_actions_table[] = {
void
gdk_window_register_dnd (GdkWindow *window)
{
- static gulong xdnd_version = 5;
+ static const gulong xdnd_version = 5;
MotifDragReceiverInfo info;
Atom motif_drag_receiver_info_atom;
GdkDisplay *display = gdk_drawable_get_display (window);
return gdk_x11_screen_supports_net_wm_hint (gdk_screen_get_default (), property);
}
-static struct
+static const struct
{
const char *xsettings_name;
const char *gdk_name;
static GPtrArray *virtual_atom_array;
static GHashTable *virtual_atom_hash;
-static gchar *XAtomsStrings[] = {
+static const gchar *const XAtomsStrings[] = {
/* These are all the standard predefined X atoms */
"NONE",
"PRIMARY",
#ifdef G_ENABLE_DEBUG
-static const gchar* visual_names[] =
+static const gchar *const visual_names[] =
{
"static gray",
"grayscale",
static void gtk_action_class_init (GtkActionClass *class);
static GQuark accel_path_id = 0;
-static const gchar *accel_path_key = "GtkAction::accel_path";
+static const gchar accel_path_key[] = "GtkAction::accel_path";
GType
gtk_action_get_type (void)
static GHashTable *binding_entry_hash_table = NULL;
static GSList *binding_key_hashes = NULL;
static GSList *binding_set_list = NULL;
-static const gchar *key_class_binding_set = "gtk-class-binding-set";
+static const gchar key_class_binding_set[] = "gtk-class-binding-set";
static GQuark key_id_class_binding_set = 0;
static gpointer parent_class = NULL;
static guint color_button_signals[LAST_SIGNAL] = { 0 };
-static GtkTargetEntry drop_types[] = { { "application/x-color", 0, 0 } };
+static const GtkTargetEntry drop_types[] = { { "application/x-color", 0, 0 } };
GType
gtk_color_button_get_type (void)
#include "gtkframe.h"
#include "gtkintl.h"
-const gchar *gtk_combo_string_key = "gtk-combo-string-value";
+const gchar gtk_combo_string_key[] = "gtk-combo-string-value";
#define COMBO_LIST_MAX_HEIGHT (400)
#define EMPTY_LIST_HEIGHT (15)
/* --- variables --- */
-static const gchar *vadjustment_key = "gtk-vadjustment";
+static const gchar vadjustment_key[] = "gtk-vadjustment";
static guint vadjustment_key_id = 0;
-static const gchar *hadjustment_key = "gtk-hadjustment";
+static const gchar hadjustment_key[] = "gtk-hadjustment";
static guint hadjustment_key_id = 0;
static GSList *container_resize_queue = NULL;
static guint container_signals[LAST_SIGNAL] = { 0 };
};
/* Target types for dragging from the shortcuts list */
-static GtkTargetEntry shortcuts_source_targets[] = {
+static const GtkTargetEntry shortcuts_source_targets[] = {
{ "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }
};
/ sizeof (shortcuts_source_targets[0]));
/* Target types for dropping into the shortcuts list */
-static GtkTargetEntry shortcuts_dest_targets[] = {
+static const GtkTargetEntry shortcuts_dest_targets[] = {
{ "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW },
{ "text/uri-list", 0, TEXT_URI_LIST }
};
/ sizeof (shortcuts_dest_targets[0]));
/* Target types for DnD from the file list */
-static GtkTargetEntry file_list_source_targets[] = {
+static const GtkTargetEntry file_list_source_targets[] = {
{ "text/uri-list", 0, TEXT_URI_LIST }
};
static const GtkTargetEntry drop_types[] = {
{ "text/uri-list", 0, TARGET_URILIST}
};
- static gint n_drop_types = sizeof(drop_types)/sizeof(drop_types[0]);
+ static const gint n_drop_types = sizeof(drop_types)/sizeof(drop_types[0]);
static const GtkTargetEntry drag_types[] = {
{ "text/uri-list", 0, TARGET_URILIST},
{ "UTF8_STRING", 0, TARGET_UTF8_STRING },
{ "TEXT", 0, 0 },
{ "COMPOUND_TEXT", 0, 0 }
};
- static gint n_drag_types = sizeof(drag_types)/sizeof(drag_types[0]);
+ static const gint n_drag_types = sizeof(drag_types)/sizeof(drag_types[0]);
gtk_drag_dest_set (GTK_WIDGET (filesel),
GTK_DEST_DEFAULT_ALL,
*/
static struct {
- gchar *name;
+ const gchar *name;
gboolean present;
struct stat statbuf;
} no_stat_dirs[] = {
NUM_XPMS
};
-static const char *xpm[][27] =
+static const char *const xpm[][27] =
{
/* spline: */
{
guint action_idle_handler;
} GtkIconViewItemAccessible;
-static const gchar *gtk_icon_view_item_accessible_action_names[] =
+static const gchar *const gtk_icon_view_item_accessible_action_names[] =
{
"activate",
NULL
};
-static const gchar *gtk_icon_view_item_accessible_action_descriptions[] =
+static const gchar *const gtk_icon_view_item_accessible_action_descriptions[] =
{
"Activate item",
NULL
(GInterfaceFinalizeFunc) NULL,
NULL
};
- static GInterfaceInfo atk_selection_info =
+ static const GInterfaceInfo atk_selection_info =
{
(GInterfaceInitFunc) gtk_icon_view_accessible_selection_interface_init,
(GInterfaceFinalizeFunc) NULL,
static void
gtk_input_dialog_fill_axes(GtkInputDialog *inputd, GdkDevice *info)
{
- static const char *axis_use_strings[GDK_AXIS_LAST] =
+ static const char *const axis_use_strings[GDK_AXIS_LAST] =
{
"",
N_("X"),
/* --- static variables --- */
static GtkItemFactoryClass *gtk_item_factory_class = NULL;
static gpointer parent_class = NULL;
-static const gchar *item_factory_string = "Gtk-<ItemFactory>";
+static const gchar item_factory_string[] = "Gtk-<ItemFactory>";
static GMemChunk *ifactory_item_chunks = NULL;
static GMemChunk *ifactory_cb_data_chunks = NULL;
static GQuark quark_popup_data = 0;
gboolean group_changed);
static GtkMenuShellClass *parent_class = NULL;
-static const gchar *attach_data_key = "gtk-menu-attach-data";
+static const gchar attach_data_key[] = "gtk-menu-attach-data";
static guint menu_signals[LAST_SIGNAL] = { 0 };
static gint text_window_get_height (GtkTextWindow *win);
-static GtkTargetEntry target_table[] = {
+static const GtkTargetEntry target_table[] = {
{ "GTK_TEXT_BUFFER_CONTENTS", GTK_TARGET_SAME_APP, 0 },
};
static gboolean get_keyboard_mode (GtkWidget *widget);
static GtkObjectClass *parent_class;
-static const gchar *tooltips_data_key = "_GtkTooltipsData";
-static const gchar *tooltips_info_key = "_GtkTooltipsInfo";
+static const gchar tooltips_data_key[] = "_GtkTooltipsData";
+static const gchar tooltips_info_key[] = "_GtkTooltipsInfo";
GType
gtk_tooltips_get_type (void)
_gtk_tree_data_list_check_type (GType type)
{
gint i = 0;
- static GType type_list[] =
+ static const GType type_list[] =
{
G_TYPE_BOOLEAN,
G_TYPE_CHAR,
NODE_INFO (p)->dirty = TRUE;
}
-static const gchar *open_tag_format[] = {
+static const gchar *const open_tag_format[] = {
"%*s<UNDECIDED",
"%*s<ui",
"%*s<menubar",
"%*s<accelerator"
};
-static const gchar *close_tag_format[] = {
+static const gchar *const close_tag_format[] = {
"%*s</UNDECIDED>\n",
"%*s</ui>\n",
"%*s</menubar>\n",
/* XPM */
-static const char *tree_minus[] = {
+static const char *const tree_minus[] = {
/* width height num_colors chars_per_pixel */
" 9 9 2 1",
/* colors */
/* XPM */
-static const char *tree_plus[] = {
+static const char *const tree_plus[] = {
/* width height num_colors chars_per_pixel */
" 9 9 2 1",
/* colors */
static XdgParentList *parent_list = NULL;
static XdgDirTimeList *dir_time_list = NULL;
static XdgCallbackList *callback_list = NULL;
-const char *xdg_mime_type_unknown = "application/octet-stream";
+const char xdg_mime_type_unknown[] = "application/octet-stream";
enum
#define xdg_mime_dump XDG_ENTRY(dump)
#endif
-extern const char *xdg_mime_type_unknown;
+extern const char xdg_mime_type_unknown[];
#define XDG_MIME_TYPE_UNKNOWN xdg_mime_type_unknown
const char *xdg_mime_get_mime_type_for_data (const void *data,